package com.ruoyi.leaveManage.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.leaveManage.bo.LeaveManageAddBo;
import com.ruoyi.leaveManage.bo.LeaveManageEditBo;
import com.ruoyi.leaveManage.bo.LeaveManageQueryBo;
import com.ruoyi.leaveManage.domain.LeaveManage;
import com.ruoyi.leaveManage.domain.LeaveUser;
import com.ruoyi.leaveManage.vo.LeaveUserVo;
import com.ruoyi.leaveManage.vo.LeaveVo;

import java.util.Collection;
import java.util.List;

/**
 * 请假信息Service接口
 *
 * @author ruoyi
 * @date 2021-04-26
 */
public interface ILeaveManageService extends IService<LeaveManage> {
	/**
	 * 查询单个
	 * @return
	 */
	LeaveVo queryById(Long leaveId);

	/**
	 * 根据年级学院专业查询
	 * @param bo
	 * @return
	 */
//	LeaveManageVo queryByGradeCollegeMajor(LeaveManageQueryBo bo);

	/**
	 * 查询列表
	 */
	List<LeaveVo> queryList(LeaveManageQueryBo bo);
	/**
	 * 查询请假报表
	 */
	public List<LeaveUserVo> getReportFromList(LeaveManageQueryBo bo );
	/**
	 * 老师下的学生假条列表
	 * @param bo
	 * @return
	 */
	List<LeaveUserVo> collegeOrteacherQueryList(LeaveManageQueryBo bo);

	/**
	 * 根据新增业务对象插入请假信息
	 * @param bo 请假信息新增业务对象
	 * @return
	 */
	Boolean insertByAddBo(LeaveManageAddBo bo);

	/**
	 * 根据编辑业务对象修改请假信息
	 * @param bo 请假信息编辑业务对象
	 * @return
	 */
	Boolean updateByEditBo(LeaveManageEditBo bo);

	/**
	 * 审核假条
	 * @param bo
	 * @return
	 */
	Boolean updateApprove(LeaveManageEditBo bo);

	/**
	 * 校验并删除数据
	 * @param ids 主键集合
	 * @param isValid 是否校验,true-删除前校验,false-不校验
	 * @return
	 */
	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
